expression: Invalidate bindings before destroying them
authorBenjamin Otte <otte@redhat.com>
Tue, 26 Nov 2019 02:57:40 +0000 (03:57 +0100)
committerMatthias Clasen <mclasen@redhat.com>
Sat, 30 May 2020 21:48:44 +0000 (17:48 -0400)
commitad60efb5d79002bda0202b66d60bd6aaec64df95
tree3ff45d0ab5421fc7b083b7024699162e2280fb0e
parentb7efe4eb4fc99fd1ca5901f90d962478aba16e00
expression: Invalidate bindings before destroying them

Use a weak ref to invalidate bindings. Make sure that this happens
before creating any watches, so that notifies from the
watched expression about changes will not trigger set_property() calls
during dispose()/finalize().

Invalidating also ensures that the watches aren't removed, which can
trigger warnings if the watches are watching the object itself, and the
weak refs cannot be removed anymore.
gtk/gtkexpression.c